//
// Created by lyx on 2020/9/9.
//

#include <iostream>
#include <Utils.h>
using namespace std;
using namespace lyxutils::abbreviations;

int main(){
    cout<<"get random color contrast to following:"<<endl;
    auto display_color=[](const vector<int> &c,string head="",string tail="\n"){
        cout<<head;
        for(int c1:c)cout<<c1<<",";
        cout<<tail;
    };
    vector<int> c1=lyxutils::colors::rand_color();
    display_color(c1,"{0,0,0}:");
    vector<int> c2=lyxutils::colors::rand_color({32,64,128});
    display_color(c2,"{32,64,128}:");
    vector<int> c3=lyxutils::colors::rand_color({192,224,240});
    display_color(c3,"{192,224,240}:");
    vector<int> c4=lyxutils::colors::rand_color({32,128,240},{40,80,120});
    display_color(c4,"{32,128,240}(with range={40,80,120}):");
    cout<<str::center("test ColorGenerator",60,'=')<<endl;
    xcolor::ColorGenerator gen(xcolor::black,80,5);
    Vec3i c_one=gen();
    cout<<"first color:"<<c_one<<endl;
    for(int i=1;i<10;++i){
        cout<<"color#"<<i<<":"<<gen()<<endl;
    }
}